<?php
/* @var $this yii\web\View */

$this->title = '轮播图管理';
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', '轮播图管理'), 'url' => ['index']];
?>
<div class="user-index">

    <?= $this->render('_search',['searchModel'=>$searchModel]);?>
    <p>
        <?= \yii\bootstrap\Html::a('发布广告 ', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= \yii\grid\GridView::widget([
        'dataProvider' => $dataProvider,
        //'filterModel' => $searchModel,
        'columns' => [
            // 序号列
            ['class' => 'yii\grid\SerialColumn'],
            'name',
            ['attribute'=>'url','value'=>function($model){
                return '<img src="'.$model->url.'" style="width:50px;height:100px">';
            }
                ,'format'=>'html'],
            //动作列 用于显示一些动作按钮，如每一行的更新、删除操作。
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
</div>

